<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>菜品详情</title>
<link href="/lib/css/business.css" type="text/css" rel="stylesheet"/> 
<script type="text/javascript" src="/lib/jquery/jquery-1.3.2.min.js"></script>
<style type="text/css">
.show_dish img{
	widht: 200px;
	height: 200px;
	text-algin: center;
}
/*评价*/
.main{
	background-image: url('/lib/images/business/bg1.png');
}
.evaluation li{
	display: inline;
}
.evaluation_info{
	width:60%;
	float:left;
	margin: 2px auto;
	
	border:3px red solid;
}

/*菜品购买数量、买家*/
.buyer{
	width:19%;
	margin-top: 30px;
	float: left;
	border:3px red solid;
}
</style>
<script type="text/javascript">

</script>
</head>
<body>
<div class="bgbox">
<div id="header" class="header"  >
	<%	var name = session.account.name!;
	if(name == null){ %>
	<a href="javascript:showLogin();" class="left"><span>登录</span>|</a>
	<% }else{ %>
	<a href="/toModifyAccountMsg" class="left"><span>${session.account.name!}</span>|</a>
	<% } %>
	<a href="/business/cart/toCart" class="left"><span>我的购物车</span>|</a>
	<a href="/" class="left"><span>首页</span></a>
	<a href="/logout" class="right"><span>退出</span></a>
	<a href="/business/order/toOrderHistory" class="right"><span>我的订单</span>|</a>
</div>
<div class="main">
	<% if(dish != null && dish.dish_id != null){ %>
	<!-- 图片展示 -->
	<div class="show_dish">
		<img alt="" src="${dish.image}"/>
	</div>
	<!-- 菜品简介 -->
	<div class="separate"><span>美食信息</span></div>
	<div>
		<table>
			<tr>
				<td style="width:100px;">推荐：</td>
				<% if(dish.grade == null){ %>
				<td style="width:600px;"><span>店家推荐</span></td>	
				<% }else{ %>
				<td style="width:600px;"><img alt="" src="/lib/images/business/dish/stars${dish.grade,numberFormat='#'}.gif"></td>
				<% } %>
			</tr>
			<tr>
				<td>介绍：</td>
				<td><span>${dish.info}</span></td>
			</tr>
			<tr>
				<td>价格：</td>
				<td><span>￥${dish.price}</span></td>
			</tr>
			<tr>
				<form action="/business/cart/toCart" method="post">
				<input type="hidden" value="${dish.cuisine_dish_id}" name="cuisine_dish_id" />
				<td>
				<input type="button" name="" value="加入购物车" onclick="addToCart(${dish.cuisine_dish_id});"/> 
				</td>
				<td>
				<input type="submit" name="" value="下单" onclick="return toOrder();;"/>
				</td>
				</form>
			</tr>
		</table>
		<% }else{ %>
			<span>已经售完了，您可以看下其他<a href="/">菜品</a></span>
		<% } %>
	</div>
	<!-- 买家评价 -->
	<div class="separate"><span>买家评价</span></div>
	<% for(e in evaluation){ %>
	<div class="evaluation">
		<table>
			<tr>
				<td style="width:60%">
					<img alt="" src="/lib/images/business/dish/stars${e.grade}.gif"/>
				</td>
				<td style="width:20%;text-align:center;margin:auto;"><span>数量：${e.quantity}</span></td>
				<td style="width:20%;text-align:center;margin:auto;"><span>${e.name}</span></td>
			</tr>
			<tr>
				<td>
					<span>${e.evaluation}不错，值得推荐。这家都来了好几次了，有很多东西可以选，还有滋补品，最主要的大多是不易上火的美食，下次还来！</span>
				</td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td>
					<span>${e.create_date,dateFormat='yyyy年MM月dd日 HH:mm:ss'}</span>
				</td>
				<td></td>
				<td></td>
			</tr>
		</table>
	<hr style="background:red;">
	</div>
	<% } %>
</div>
<div id="footer" class="footer">
	<table>
		<tr>
			<td><span class="right">咨询电话：</span></td>
			<td><a href="#" class="left">123456</a></td>
			<td><span class="">送餐电话：</span></td>
			<td><a href="#">123456</a></td>
		</tr>
	</table>
</div>
</div>
<!-- 生成二维码 -->
<div class="erweima" style="display:none;">
	<div id="erweima"></div>
</div>
</body>
<script type="text/javascript" src="/lib/js/business.js"></script>
</html>